[code_assets] Support custom target OS and Architecture - #3413
Conversation
PR HealthAPI leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
This check can be disabled by tagging the PR with Breaking changes ✔️
This check can be disabled by tagging the PR with |
c57aaef to
5faa75d
Compare
Package publishingIf you have publishing permissions, you can use the links below to publish the changes after merging this PR.
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
0dfe2f3 to
27eeaef
Compare
27eeaef to
4d6c36c
Compare
4d6c36c to
4b771f3
Compare
|
@goderbauer I'm not entirely sure what to do with link mode preference and link mode:
If we decide to lock it down, then the way to add something later from our side would be to make a new asset type And I can't think of a link mode we would add in the first place. WDYT about locking it down instead of making it extensible? |
Yeah, given that it is highly questionable that we'll ever add another mode (famous last words): Let's lock it down. |
128f9fb to
de8fd8a
Compare
de8fd8a to
23dc6db
Compare
23dc6db to
761c686
Compare
Made a separate PR for this: |
761c686 to
6ce683f
Compare
fa60898 to
0a837af
Compare
6ce683f to
009567e
Compare
009567e to
4f941ad
Compare
0a837af to
3b33741
Compare
4f941ad to
898be11
Compare
Makes the link mode and link mode preference closed enums / a closed tagged union. #3413 (comment) Code assets changes: * Changes the JSON schema to a closed enum for link mode preference and closed tagged union for link mode. * So encountering an unknown value in a json is now a parse error. * And will print a more elaborate error message. * Sealed the `LinkMode` class. * Skipping a version bump, we'll bump to 2.0 in the next PR due to breaking changes. JSON syntax generator changes: * Updated closed enum generation to pass valid enum values to `_throwFormatException`. * Updated closed tagged union generationto pass valid discriminator tag values to `_throwFormatException`. * Added `Set<String>? expectedValues` parameter to `throwFormatException` and `errorString` to format error messages as `Expected one of 'a', 'b'`. * Made `expectedType` an optional named parameter on `throwFormatException` and `errorString` in `helper_library.dart`. * Added a json path to the constructor for enums to be able to give the json path in the error message. Other package changes: * Update all the generated syntax (no functional change as they have no closed enums).
898be11 to
80bc5bd
Compare
Closes: #3411
Closes: #1258
Enables
to work properly.
The other open enums in the JSON schema that were not open in the Dart API:
Link mode and link mode preference should be closed:
LinkModeandLinkModePreferenceclosed #3462If we were to add code assets already presigned and prepackaged in xcodeframeworks for example, it would be a new asset type, rather than new option for the existing asset type.
Because we don't have a pub workspace for FFIgen and JNIgen with the other packages, we now need many more pubspec overrides. Basically before it was kinda working without a complete set of overrides because the inconsistent set of deps (half from the repo, half from pub) managed to resolve. This is no longer true with pushing
code_assetstov2.0.0.